<?php
namespace app\common\model;
use think\Model;
use think\Cache;
class AuthRule extends Model
{
    protected static function init()
    {
        AuthRule::afterWrite(function ($rule) {
            rmdirs(CACHE_PATH, false);
            Cache::clear();
        });
    }
}